home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The X-Philes (2nd Revision)
/
The X-Philes Number 1 (1995).iso
/
xphiles
/
hp48hor1
/
tdir.doc
< prev
next >
Wrap
Text File
|
1995-03-31
|
3KB
|
61 lines
(Comp.sys.handhelds)
Item: 3540 by ftg0673 at tamsun.TAMU.EDU
Author: [Rick Grevelle]
Subj: HP48 Temporary Directories
Date: Fri Jun 21 1991
Using directories in the 48 has its share of disadvantages. My personal
preference is not to use them at all. Overall, directories access their
variables slower than libraries, and since they must be stored in the RAM
in order to be effectively used, there is less memory available for the
48 to operate, increasing the frequency of memory packing, and resulting
in even slower execution timings.
In a recent discussion with one of the most knowledgeable individuals of
whom I know outside of HP regarding the 48, I realized that there must be
many users who have yet to see how easy it is to incorporate a directory
type format into libraries, and altogether dump the directory habit :-).
Unfortunately, one very convenient feature for doing this was not provided
by HP on the user language level. So some time ago I developed a program
to deal with this deficiency. Very similar to the TMENU command, TDIR has
an analogous role for directories. Temporary directories are used in the
the 48 quite often; such keys as MTH, and PRG invoke such directories, and
are no different from the the TDIR command being introduced here.
Any list that can be used as a valid argument for the TMENU command can be
easily modified to be used as a valid argument for the TDIR command. All
that is necessary to do is to put the name of the temporary directory in a
string in level two, and then the argument list which is normally used by
TMENU in level one. Combine the two arguments into a single list by using
the 2 ->LIST sequence. This is the form in which the argument list must
be in order for TDIR to properly function. Here's an example argument:
{ { "UC" { AND OR XOR NOT
{ "dup" \<< # 3188h SYSEVAL \>> }
{ "drop" \<< # 3244h SYSEVAL \>> }
} } }
Multiple directories can be used with TDIR, and when more than six are used,
the NXT key will display the next page of directories just like TMENU does
when more than six menus are used. Probably the quickest example that I can
think of is to combine the MTH, and PRG keys into a one temporary directory.
\<< # 3B551h SYSEVAL # 3B293h SYSEVEL + TDIR \>>
Executing the above will immediately result in the combination of the two keys
MTH, and PRG, so each time the NXT key is pressed the next page of temporary
directories will appear. There is no limit, other than memory constraints, to
the number of temporary directories than can be used together in this manner.
Below is a directory that contains the TDIR command along with the sample list
from the earlier example. Users already familiar with the use of TMENUs will
have a slight advantage here, but I feel this material is sufficiently
straightforward enough for everyone.
Rick Grevelle